#ifndef SCRIPTTASK_H
#define SCRIPTTASK_H

#include <defs/export.h>
#include <defs/global.h>
#include <core/task.h>

#include <QtCore>

class DeclarativeExtension;
class DeclarativeEnvironment;

O_PRIVATE_DECLARE(DeclarativeTask);
class DeclarativeTask : public Opl::Core::Task {
    Q_OBJECT
public:    
    DeclarativeTask(DeclarativeExtension* ext, const QUrl& url);
    virtual ~DeclarativeTask();
    bool isValid()const;
protected:
	virtual void changeSource(const QString& script);
	virtual void run();
	virtual void setup();

private slots:
	virtual void cleanup();
private:
	O_PRIVATE_DECLARE_MEMBER(DeclarativeTask)
};

#endif // SCRIPTTASK_H

